package demo;


import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.util.StrUtil;
import com.jesse.eclgy.plug.db.RecordSetPlus;
import com.jesse.eclgy.plug.wrapper.*;
import demo.dao.DemoDao;
import demo.entity.DemoEntity;
import weaver.general.GCONST;

import java.util.*;


public class DemoTest2 {

    static
    {
        GCONST.setRootPath("D:\\IdeaProjects\\ZoneOA-lib\\");
        GCONST.setServerName("ecology");
    }


    public static void main(String[] args)
    {

        RecordSetPlus rsp = new RecordSetPlus();
        rsp.setOnSuccess((sql, params) -> {
            System.out.println(sql);
            System.out.println(params);
        });
        rsp.executeQuery(QueryWrapper.builder().tableName("uf_asset").column("id") );

        System.out.println(rsp.next());
        System.out.println(rsp.getCounts());

//
//        final int colCount = rsp.getColCounts();
//        final String[] columnTypeName = rsp.getColumnTypeName();
//        final String[] columnName = rsp.getColumnName();
//
//
//        for (int i = 0; i < colCount; i++)
//        {
//            System.out.println(columnName[i] + "\t" +columnTypeName[i]  );
//
//        }

    }
}